package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZhHotSearchMapper;
import com.ruoyi.system.domain.ZhHotSearch;
import com.ruoyi.system.service.IZhHotSearchService;
import com.ruoyi.common.support.Convert;
import org.springframework.transaction.annotation.Transactional;

/**
 * 热搜 服务层实现
 * 
 * @author ruoyi
 * @date 2019-05-02
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ZhHotSearchServiceImpl implements IZhHotSearchService 
{
	@Autowired
	private ZhHotSearchMapper zhHotSearchMapper;

	/**
     * 查询热搜信息
     * 
     * @param id 热搜ID
     * @return 热搜信息
     */
    @Override
	public ZhHotSearch selectZhHotSearchById(Integer id)
	{
	    return zhHotSearchMapper.selectZhHotSearchById(id);
	}
	
	/**
     * 查询热搜列表
     * 
     * @param zhHotSearch 热搜信息
     * @return 热搜集合
     */
	@Override
	public List<ZhHotSearch> selectZhHotSearchList(ZhHotSearch zhHotSearch)
	{
	    return zhHotSearchMapper.selectZhHotSearchList(zhHotSearch);
	}
	
    /**
     * 新增热搜
     * 
     * @param zhHotSearch 热搜信息
     * @return 结果
     */
	@Override
	public int insertZhHotSearch(ZhHotSearch zhHotSearch)
	{
	    return zhHotSearchMapper.insertZhHotSearch(zhHotSearch);
	}
	
	/**
     * 修改热搜
     * 
     * @param zhHotSearch 热搜信息
     * @return 结果
     */
	@Override
	public int updateZhHotSearch(ZhHotSearch zhHotSearch)
	{
	    return zhHotSearchMapper.updateZhHotSearch(zhHotSearch);
	}

	/**
     * 删除热搜对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteZhHotSearchByIds(String ids)
	{
		return zhHotSearchMapper.deleteZhHotSearchByIds(Convert.toStrArray(ids));
	}
	
}
